package com.zengqingfa.designpattern.create.factory.method;

/**
 *
 * @fileName: Client
 * @author: zengqf3
 * @date: 2021-4-21 16:36
 * @description:
 */
public class Client {

    public static void main(String[] args) {
        ProductFactory factory1 = new ConcreteProduct1Factory();
        Product product1 = factory1.createProduct();
        System.out.println(product1.getName());

        ProductFactory factory2 = new ConcreteProduct2Factory();
        Product product2 = factory2.createProduct();
        System.out.println(product2.getName());
    }
}
